﻿using Abp.Domain.Entities.Auditing;
using KDS.Mes.Mes.AlcCodes;
using KDS.Mes.Mes.Lines;
using KDS.Mes.Mes.PlanModes;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace KDS.Mes.Mes.Plans
{
    /// <summary>
    /// 计划信息
    /// </summary>
    [Table("T_Plan")]
    public class Plan : FullAuditedEntity
    {
        [ForeignKey("LineId")]
        public virtual Line Line { get; set; }
        /// <summary>
        /// 所属线体
        /// </summary>
        public virtual int LineId { get; set; }

        [ForeignKey("AlcCodeId")]
        public virtual AlcCode AlcCode { get; set; }
        /// <summary>
        /// 所属ALCCode
        /// </summary>
        public virtual int AlcCodeId { get; set; }

        [ForeignKey("PlanModeId")]
        public virtual PlanMode PlanMode { get; set; }
        /// <summary>
        /// 所属计划模式
        /// </summary>
        public virtual int PlanModeId { get; set; }

        /// <summary>
        /// 优先级
        /// </summary>
        [Required]
        public int Priority { get; set; }

        /// <summary>
        /// 计划数量(套)
        /// </summary>
        [Required]
        public int PlanQty { get; set; }

        /// <summary>
        /// 计划日期
        /// </summary>
        [Required]
        public DateTime PlanDate { get; set; }
        [MaxLength(50)]
        
        public string AfterSalePart { get; set; }
        [MaxLength(50)]

        public string Remarks { get; set; }

    }
    public enum IsOnline : byte
    {
        未上线 = 0,
        已上线 = 1
    }
}
